<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>测试</title>
    <style type="text/css" media="screen" id="test">
        .div{
            width:300px;
            height:200px;
            border:2px solid blue;
            left:110px;
            padding:10px;
        }
        .dc{
            border:3px solid blue;
            padding:10px;
        }
        .gac_m{
            background:white none repeat scroll 0 0;
            border:5px solid black;
            cursor:default;
            font-size:13px;
            line-height:17px;
            margin:0;
            position:absolute;
            z-index:99;
            list-style:none;
            padding-left:0px;
        }
    </style>
     <script type="text/javascript">
        djConfig = {
            isDebug:true
        }
     </script>
    <script type="text/javascript" src="/dojo1.3/dojo/dojo.js"></script>
    <script type="text/javascript">
        dojo.require("dojox.html.styles");
        dojo.addOnLoad(function(){
            return; 
            var input = dojo.byId('orgNameId');
            var info = dojo.byId('info');
            var mBox = dojo.marginBox(input);
            var cBox = dojo.contentBox(input);
            var margin = dojo._getMarginExtents(input);
            var border = dojo._getBorderExtents(input);
            console.log(mBox);
            console.log(cBox);
            console.log(margin);
            console.log(border);
            console.log(mBox.l,mBox.t,mBox.w,mBox.h);
            console.log(cBox.l,cBox.t,cBox.w,cBox.h);
            console.log(margin.l,margin.t,margin.w,margin.h);
            console.log(border.l,border.t,border.w,border.h);
            dojo.marginBox(info,{
                t:mBox.t+mBox.h - (margin.h-margin.t),
                w:mBox.w - margin.w,
                l:mBox.l + margin.l
            });
            
            return;
            //下面的是为ie准备的
            var infoMarginBox = dojo.marginBox(info);
              console.log(infoMarginBox);
            v = info.style;
            var containerStyle = dojo.style(info);
            dojo.style(info,{
                left:  getPosition(input, "offsetLeft")+getBorder(input,"borderLeftWidth")+'px',
                top:getPosition(input, "offsetTop") +getBorder(input,"borderTopWidth")+input.offsetHeight-1+'px',
                width:input.offsetWidth+20+ "px"
            })
            return;
            console.log('======>'+getBorder(input,"borderLeftWidth"));
            v.left = getPosition(input, "offsetLeft")+getBorder(input,"borderLeftWidth")+ "px";
            v.top = getPosition(input, "offsetTop") +getBorder(input,"borderTopWidth")+input.offsetHeight-1+ "px";
            v.width = input.offsetWidth+ "px";
            console.log('1----------------------'+input.offsetWidth);
          
            infoMarginBox = dojo.marginBox(info);
            console.log(infoMarginBox);
            console.log('2----------------------');
            console.log(getPosition(input,"offsetLeft"));
            console.log(getPosition(input,"offsetTop")+input.offsetHeight);
        });
        function getBorder(elem,prop){
                var sum = 0;
                elem = elem.offsetParent;
                while(elem){
                    var elemStyle = dojo.style(elem);

                    var width = parseInt(elemStyle[prop]);
                    sum += (width = !isNaN(width) && width);
                    elem = elem.offsetParent;
                }
                return sum;
        }
       function setPosition(elem,info){
                containerStyle.left = getPosition(inputElem,"offsetLeft")+"px";
                containerStyle.top= getPosition (inputElem,"offsetTop")+offsetHeight-1+"px";
                containerStyle.width=offsetWidth+"px";
        }
        
        function getPosition(elem,prop){
            var sum = 0;
            while(elem){
                sum += elem[prop];
                elem=elem.offsetParent
            }
            return sum  ;
        }
        dojo.addOnLoad(function(){
            var s1 = dojo.byId('s1') ;
            console.log(s1);
           
        });
        function test1(){
            
            console.log('aa');
        }
    </script>
</head>
<body>
    <div id="d5" class="dc">
        
                    <div id="d11" style="padding:47px;border:5px solid blue;width:400px">
                        <div style="padding:10px;">
                            <h1>选同事</h1>
                            <form action="http://profile.tianji.com/Profile/Find/Colleagues?isNew=true" onsubmit="javascript:return false">
                                
                                <input id="orgNameId" type="text" size="55" style="padding:1px;margin:1px;border:1px solid red"/>
                                <select id="s1" onclick="test1()">
                                    <option value="">请选择</option>
                                    <option value="1">1</option>
                                    <option value="2">2</option>
                                    <option value="3">3</option>
                                </select>
                            </form>
                        </div>
                    </div>

    </div>
    <ul   id="info" class="gac_m">
        <li>bbbbbbb</li>
        <li>ccccccc</li>
        <li>ddddddd</li>
        <li>aaaaaa</li>
        <li>aaaaaa</li>

    </ul>
    <table>
        <tr>
            <td>aaaaa</td>
        </tr>
         <tr>
            <td>aaaaa</td>
        </tr>
         <tr>
            <td>aaaaa</td>
        </tr>
         <tr>
            <td>aaaaa</td>
        </tr>
    </table>
</body>
</html>
